package Native
{
	import Objects.GameObject;
	import Objects.GameSprite;
	
	import flash.display.Sprite;
	import flash.geom.Rectangle;

	public class NativeSprite extends Sprite implements INativeObject
	{
		private var draging:Boolean;
		public function NativeSprite()
		{
			super();
		}
		private var m_go:GameObject;
		public function set go(value:GameObject):void
		{
			m_go=value;
		}
		public function get go():GameObject
		{
			return m_go;
		}
		override public function startDrag(lockCenter:Boolean=false, bounds:Rectangle=null):void
		{
			if(!draging)
			{
				super.startDrag(lockCenter,bounds);
				draging=true;
			}
		}
		override public function stopDrag():void
		{
			if(draging)
			{
				super.stopDrag();
				draging=false;
			}
		}
		public function get sprite():GameSprite
		{
			return go as GameSprite;
		}
	}
}